package com.ssy.lingxi.search.service;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.model.vo.PageVO;
import com.ssy.lingxi.search.api.model.request.channel.ChannelCommodityCollectBatchRequest;
import com.ssy.lingxi.search.api.model.request.channel.ChannelCommodityCollectRequest;
import com.ssy.lingxi.search.api.model.response.CollectResponse;
import com.ssy.lingxi.search.entity.channel.CommodityCollectChannel;
import org.springframework.data.domain.Page;

/**
 * 商品收藏管理类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/9/2
 */
public interface ICommodityCollectChannelService {
    /**
     * 查询商品收藏--商品能力
     * @param pageVO
     * @return Wrapper<Page<CommodityCollect>>
     */
    Page<CommodityCollectChannel> getCommodityCollectChannelList(UserLoginCacheDTO sysUser, Long shopId, Long channelMemberId, PageVO pageVO);

    /**
     * 查询商品收藏--商品能力
     * @param pageVO
     * @return Wrapper<Page<CommodityCollect>>
     */
    Page<CommodityCollectChannel> getCommodityCollectChannelList(UserLoginCacheDTO sysUser, PageVO pageVO);

    /**
     * 查询该商品是否已经收藏
     */
    CollectResponse getCommodityCollect(Long channelMemberId, Long channelMemberRoleId, Long channelCommodityId, UserLoginCacheDTO sysUser, Long shopId);

    /**
     * 添加商品收藏
     * @param commodityCollectChannelRequest
     * @return
     */
    Long saveCommodityCollectChannel(UserLoginCacheDTO sysUser, Long shopId, ChannelCommodityCollectRequest commodityCollectChannelRequest);

    /**
     * 批量新增商品收藏
     * @param sysUser
     * @param shopId
     * @param channelCommodityCollectBatchRequest
     * @return
     */
    Boolean saveBatchCommodityCollect(UserLoginCacheDTO sysUser, Long shopId, ChannelCommodityCollectBatchRequest channelCommodityCollectBatchRequest);

    /**
     * 删除商品收藏
     * @param commodityCollectChannelRequest
     * @return
     */
    String deleteCommodityCollectChannel(UserLoginCacheDTO sysUser, Long shopId, ChannelCommodityCollectRequest commodityCollectChannelRequest);

    /**
     * 删除商品收藏通过id
     * @param id
     * @return
     */
    String deleteCommodityCollectChannelById(UserLoginCacheDTO sysUser, Long id);

}
